package com.demo.test.entity;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.junit.jupiter.api.Test;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Document("emp")
public class Employee {

    @Id
    private Integer id;

    @Field("username")
    private String name;

    @Field
    private int age;

    @Field
    private Double salary;

    @Field
    private Date birthday;
}
